bioniclefandomcom_da-20200214-history
Skabelon:EraG1
Kategori:Generation 1x30px|class=hover-img|link=BIONICLE#Generation 1|Denne side omhandler indhold fra BIONICLE Generation 1 }| ▾ |}} }| }}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} }| }}} |}} |}} Documentation This template produces an indicator in the top right corner of the page to show that the article relates to Generation 1 of BIONICLE. Compare to Template:EraG2. Basic usage Place this on all Generation 1 articles except character pages (as outlined in the next section): Dropdown (only for use on character, faction, or event pages) On these pages, also indicate the "era" in which the character/faction/event played a major story role. "Eras" mostly correspond to years. However, 2003, 2009, and 2010 all include two eras, as the years were divided into distinct plotlines. This makes a total of thirteen eras. Again, only list the eras in which the subject featured prominently, not just when they made an appearance. For example, Hahli and each of the Toa Nuva would not receive era icons for 2004 or 2005, as they only briefly appeared in the framing devices (prologues, etc.). Also, appearances in guide books or Greg quotes do not warrant era icons. For example, Macku appears in BIONICLE: Metru Nui - City of Legends, but this does not warrant a 2004 era icon. Use this format instead to indicate the eras, removing the ones that are irrelevant. The era icons are grouped in a dropdown that appears next to the main Generation 1 indicator. See Vakama for an example of the template in action. * Era 1 (2001) * Era 2 (2002) * Era 3a (2003) * Era 3b (2003) * Era 4 (2004) * Era 5 (2005) * Era 6 (2006) * Era 7 (2007) * Era 8 (2008) * Era 9 (2009) * Era 9T (2009) * Era 10 (2010) * Era 10 Serials (2010) Extra: ifeq logic Here is an explanation of the ifeqs that determine the dropdown tray's width. (Note that if the dropdown contains seven or fewer items, we let the tray determine its width on its own.) }| }}}}|true|false}} We want the condition to return a unique output when there are 8 items in the tray. In other words, we want it to tell us when parameter 8 is the last parameter that's defined, in which case parameter 8 is defined and parameter 9 isn't. *If parameter 8 is defined and parameter 9 is defined: false **Parameter 8 is defined, so } evaluates to }. Parameter 9 is defined, so }}}} evaluates to }. } and } are not equal in practice, as each parameter contains different text since they each represent a different era. Therefore the condition evaluates as false. *If 8 is undefined and 9 is undefined: false **Parameter 8 is undefined, so } evaluates to +. Parameter 9 is undefined, so }}}} evaluates to }, and since parameter 8 isn't defined, } in turn evaluates to -. + and - are not equal, so the condition evaluates as false. *If 8 is defined and 9 is undefined: true **Parameter 8 is defined, so } evaluates to }. Parameter 9 is undefined, so }}}} evaluates to }, and since parameter 8 is defined, } in turn evaluates to }. } and } are equal, so the condition evaluates as true. *If 8 is undefined and 9 is defined: false **Parameter 8 is undefined, so } evaluates to +. Parameter 9 is defined, so }}}} evaluates to }. As } will not be set to + in practice, the two are not equal, so the condition evaluates as false. Note that this condition will not appear in an ordinary scenario, as unless the user specifies otherwise, parameter 8 will be defined before parameter 9. Therefore this condition produces the answer of true if and only if parameter 8 is defined and parameter 9 isn't. We can use this to apply unique CSS to the tray based on how many items are in it. Why not use nested ifs to do this instead? We could, but this method makes the code a bit shorter and easier to edit since there are fewer pipe symbols and close braces to keep track of.